package model;

import java.util.Observable;

import dao.City;
import dao.Federation;

public class ModelCity extends Observable {
	private City city = new City();
	
	
	public void update(City city) {
		if(city != null){
			setOID(city.getOID());
			setNmCity(city.getNmCidade());
			setFederation(city.getFederation());
			
			setChanged();
			notifyObservers();
			
		}
	}

	public City getCity() {
		return city;
	}

	public int getOID() {
		return city.getOID();
	}
	
	public void setOID(int oID) {
		city.setOID(oID);
	}	
	
	public String getNmCity() {
		return city.getNmCidade();
	}
	
	public void setNmCity(String nmCity) {
		city.setNmCidade(nmCity);
	}
	
	public Federation getFederation() {
		return city.getFederation();
	}
	public void setFederation(Federation federation) {
		city.setFederation(federation);
		setChanged();
		notifyObservers();
	}
}
